<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: plot_box</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: plot_box</td>
      <td class="subheader-left"><a href="matlab:open plot_box">View code for plot_box</a></td>
    </tr>
  </table>
<h1>plot_box</h1><p><span class="helptopic">Draw a box</span></p><p>
<span style="color:red">plot_box</span>(<strong>b</strong>, <strong>options</strong>) draws a box defined by <strong>b</strong>=[XL XR; YL YR] on the current
plot with optional MATLAB linestyle options LS.

</p>
<p>
<span style="color:red">plot_box</span>(<strong>x1</strong>,<strong>y1</strong>, <strong>x2</strong>,<strong>y2</strong>, <strong>options</strong>) draws a box with corners at (<strong>x1</strong>,<strong>y1</strong>) and (<strong>x2</strong>,<strong>y2</strong>),
and optional MATLAB linestyle options LS.

</p>
<p>
<span style="color:red">plot_box</span>('centre', P, 'size', W, <strong>options</strong>) draws a box with center at P=[X,Y] and
with dimensions W=[WIDTH HEIGHT].

</p>
<p>
<span style="color:red">plot_box</span>('topleft', P, 'size', W, <strong>options</strong>) draws a box with top-left at P=[X,Y]
and with dimensions W=[WIDTH HEIGHT].

</p>
<p>
<span style="color:red">plot_box</span>('matlab', BOX, LS) draws box(es) as defined using the MATLAB convention of
specifying a region in terms of top-left coordinate, width and height.  One box is
drawn for each row of BOX which is [xleft ytop width height].

</p>
<h2>Options</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1"> 'edgecolor'</td> <td>the color of the circle's edge, Matlab color spec</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'fillcolor'</td> <td>the color of the circle's interior, Matlab color spec</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'alpha'</td> <td>transparency of the filled circle: 0=transparent, 1=solid</td></tr>
</table>
<ul>
  <li>For an unfilled box any standard MATLAB LineStyle such as 'r' or 'b---'.</li>
  <li>For an unfilled box any MATLAB LineProperty options can be given such as 'LineWidth', 2.</li>
  <li>For a filled box any MATLAB PatchProperty options can be given.</li>
</ul>
<h2>Notes</h2>
<ul>
  <li>The box is added to the current plot irrespective of hold status.</li>
  <li>Additional options LS are MATLAB LineSpec options and are passed to PLOT.</li>
</ul>
<h2>See also</h2>
<p>
<a href="plot_poly.html">plot_poly</a>, <a href="plot_circle.html">plot_circle</a>, <a href="plot_ellipse.html">plot_ellipse</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2014 Peter Corke.</p>
</body></html>